/* Kanvas Paint and Drawing Tool.
 * Copyright (C) 2011 Darryl Wallace
 * wallacdj@gmail.com / darryl@wallynet.ca
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MOUSETOOLSWIDGET_H
#define MOUSETOOLSWIDGET_H

#include <QtCore>
#include <QtGui>
#include "flowlayout.h"


class PluginManager;
class ITool;

class MouseToolsWidget : public QDockWidget
{
    Q_OBJECT
public:
    MouseToolsWidget(PluginManager *pluginManager, QWidget *parent=0);
    ~MouseToolsWidget();

    ITool *currentTool() const;

    void enterEvent(QEvent *e);
    void leaveEvent(QEvent *e);

signals:
    void toolSelectionChanged();

private slots:
    void getToolClicked(int id);
    void getDockWidgetFloating(bool floating);

private:
    void setupUi();

    QWidget *_internalWidget;
    ITool *_currentTool;
    QList<ITool *> _tools;
    QList<QPushButton *> _toolButtons;
    QPropertyAnimation _opacityAnimation;

    FlowLayout *_layout;
    bool _floating;
};

#endif // MOUSETOOLSWIDGET_H
